import java.io.*;

public class FileWriter1{
	public static void main(String[] args) throws Exception{
		String str = "Hello,World!";
		char[] buffer = new char[str.length()];
		str.getChars(0,str.length(),buffer,0);
		FileWriter f = new FileWriter("C:/Users/Lenovo/Desktop/BasicJava-ShengSiYuan/out.txt");
		for(int i = 0;i<buffer.length;i++){
			f.write(buffer[i]);
		}
		f.close();
	}
}